import { NgModule, Optional, SkipSelf, InjectionToken } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { registerLocaleData } from '@angular/common';
import { IndexModule } from '../modules/index/index.module';
import { ServiceModule } from '../service/service.module';
// import { LoginModule } from '../modules/login/login.module';

/**
 * 核心资源模块 (全局单例）
 * @export
 * @class CoreModule
 */
@NgModule({
  imports: [
    HttpClientModule,
    IndexModule,
    ServiceModule,
    // LoginModule
    
  ],
  providers: [
   
  ],
  exports: [
    
  ],
  declarations: [ ]
})
export class CoreModule { 
  constructor(
    @Optional() @SkipSelf() parent: CoreModule
  ) {
    if (parent) {
      throw new Error('Core模块已经存在， 不能再次加载!');
    }
  }
}